
def create_Rect_PipePillar

model = Sketchup.active_model
prompts = ["长度", "宽度","高度","壁厚","钢牌号","柱型号","柱编号"]
defaults = ["900","900","6000","52","Q420B","GKZ1","AE-1-1"]
input = UI.inputbox(prompts, defaults, "创建方管柱")

group = model.active_entities.add_group
entities = group.entities
l = input[0].to_f.mm
w = input[1].to_f.mm
z = input[2].to_f.mm
h = input[3].to_f.mm

points = []
points << [0, 0, 0]
points << [l, 0, 0]
points << [l, w, 0]
points << [0, w, 0]
face1 = entities.add_face(points)
points = []
points << [h, h, 0]
points << [l-h, h, 0]
points << [l-h, w-h, 0]
points << [h, w-h, 0]

face2 = entities.add_face(points)
entities.erase_entities(face2)

face1.pushpull(-z,true)

end